<template>
  <div>
    <h1>emit test <button @click="doEmit">触发emit</button></h1>
  </div>
</template>

<script>
export default {
  emits: {
    gogogo: (data1, data2) => {
      if (data1 && data2) {
        return true;
      } else {
        console.warn("Invalid gogogo event payload!");
        return false;
      }
    },
  },
  methods: {
    doEmit() {
      this.$emit("gogogo", "dddd1", "");
    },
  },
};
</script>

<style>
</style>